package br.mestrado.unb.bs.model.configuration;

public class SensorIdentification{

	private int sensorId;
	private Class<?> sensorClass;
	private String name;
	
	
	public SensorIdentification(int sensorId, Class<?> sensorClass, String name) {
		super();
		this.sensorId = sensorId;
		this.sensorClass = sensorClass;
		this.name = name;
	}
	
	public String getName() {
		return name;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((sensorClass == null) ? 0 : sensorClass.hashCode());
		result = prime * result + sensorId;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SensorIdentification other = (SensorIdentification) obj;
		if (sensorClass == null) {
			if (other.sensorClass != null)
				return false;
		} else if (!sensorClass.equals(other.sensorClass))
			return false;
		if (sensorId != other.sensorId)
			return false;
		return true;
	}
	public int getSensorId() {
		return sensorId;
	}
	public void setSensorId(int sensorId) {
		this.sensorId = sensorId;
	}
	public Class<?> getSensorClass() {
		return sensorClass;
	}
	public void setSensorClass(Class<?> sensorClass) {
		this.sensorClass = sensorClass;
	}
}
